package com.slipper.core.tree;

import java.io.Serializable;

public class TreeInfo {
    /** 树的根节点id */
    private Serializable rootId;

    /** 树的根节点名称 */
    private String nodeName;

    /** 树的节点类型 */
    private String nodeType;
    
    /** 节点可否操作 */
    private boolean canOp = true;
    
    /** 是否拼接父ID */
    private boolean concatIdWithPid = false;

    /** 是否懒加载 */
    private boolean lazy = false;

    /** 节点id对应Object的属性名称 */
    private String idField;

    /** 父节点id对应Object的属性名称 */
    private String pidField;

    /** 节点名称对应Object的属性名称 */
    private String textField;

    /** 节点类型对应Object的属性名称 */
    private String typeField;

    /** 节点路径对应Object的属性名称 */
    private String hrefField;

    /** 节点排序对应Object的属性名称 */
    private String sortField;

    /** 起始节点路径默认值，不为null时后缀加上 idPropertyKey=idPropertyKey对应的值 */
    private String rootHref;

    /** 节点路径默认值，不为null时后缀加上 idPropertyKey=idPropertyKey对应的值 */
    private String href;
    
    /** 节点数据 */
    private Object data;

    public TreeInfo(String nodeName) {
        this.nodeName = nodeName;
        this.rootId = 0;
    }

    public Serializable getRootId() {
        return rootId;
    }

    public void setRootId(Serializable rootId) {
        this.rootId = rootId;
    }

    public String getNodeName() {
        return nodeName;
    }

    public void setNodeName(String nodeName) {
        this.nodeName = nodeName;
    }

    public String getNodeType() {
        return nodeType;
    }

    public void setNodeType(String nodeType) {
        this.nodeType = nodeType;
    }

    public boolean isLazy() {
        return lazy;
    }

    public void setLazy(boolean lazy) {
        this.lazy = lazy;
    }

    public boolean canNotOp() {
        return !canOp;
    }

    public boolean getCanOp() {
        return canOp;
    }

    public void setCanOp(boolean canOp) {
        this.canOp = canOp;
    }

    public boolean isConcatIdWithPid() {
        return concatIdWithPid;
    }

    public void setConcatIdWithPid(boolean concatIdWithPid) {
        this.concatIdWithPid = concatIdWithPid;
    }

    public String getIdField() {
        return idField;
    }

    public void setIdField(String idField) {
        this.idField = idField;
    }

    public String getPidField() {
        return pidField;
    }

    public void setPidField(String pidField) {
        this.pidField = pidField;
    }

    public String getTextField() {
        return textField;
    }

    public void setTextField(String textField) {
        this.textField = textField;
    }

    public String getTypeField() {
        return typeField;
    }

    public void setTypeField(String typeField) {
        this.typeField = typeField;
    }

    public String getHrefField() {
        return hrefField;
    }

    public void setHrefField(String hrefField) {
        this.hrefField = hrefField;
    }

    public String getSortField() {
        return sortField;
    }

    public void setSortField(String sortField) {
        this.sortField = sortField;
    }

    public String getRootHref() {
        return rootHref;
    }

    public void setRootHref(String rootHref) {
        this.rootHref = rootHref;
    }

    public String getHref() {
        return href;
    }

    public void setHref(String href) {
        this.href = href;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
